 <script type="text/javascript" src="__PUBLIC__/js/autocomplete/jquery.autocomplete.min.js"></script>
<link rel="stylesheet" href="__PUBLIC__/js/autocomplete/jquery.autocomplete.css"/>
 <script type="text/javascript">
     function del(num) {
            var delnum = $('.del').size();
            if(delnum <= 2) {
                $('.del').addClass('hiden');
                $(".a_"+num+"").remove();  
            }else{
                $(".a_"+num+"").remove(); 
            }
      }
      $(function(){
             $(".auto_0").AutoComplete({
                    'data':"{:U('Entry/Player/setJsonPlayerData')}",
                    'ajaxDataType': 'json',
                          'width':200,
             });
            var num = 1;
            $('#add').click(function(){
                   $(".del").removeClass("hiden");
                   $('.box').append("<div class=\"line a_"+num+"\" style=\"height:5px;\"></div>"); 
                   $('.box').append(" <input name=\"ranking[]\" class=\"input1 a_"+num+"  auto_"+num+"\" placeholder=\"排名\"  />");
                   $('.box').append(" <input name=\"mem_name[]\"  class=\"input2 a_"+num+"  auto_"+num+"\" placeholder=\"选手姓名\" />");
                   $('.box').append(" <input name=\"win_price[]\" class=\"input3 a_"+num+"\" placeholder=\"赢取的金额\" />");
                   $('.box').append(" <input name=\"poy_points[]\" class=\"input4 a_"+num+"\" placeholder=\"赛季积分\" />");
                   $('.box').append(" <input type=\"button\" value=\"-\" class=\"del a_"+num+" \" onclick=\"del("+num+");\"style=\"width:25px;\" />");
                  
                   for(var i = 0; i<200 ;i++) {
                        $(".auto_"+i+"").AutoComplete({
                            'data':"{:U('Entry/Player/setJsonPlayerData')}",
                            'ajaxDataType': 'json',
                            'width':200,
                        })
                   }
                   num = num+1;
            });
            
        }); 
    </script>
   
    <style type="text/css">
        .box{width:452px;height:auto;}
        .box2{width:452px;height:auto;margin:10px 0 0 0;}
        .input2{width:140px;height:32px;color: #404040;}
        .input1,.input3,.input4{width:70px;height:32px;color: #404040;}
        .hiden{display: none;}
    </style> 
<section>
    <label class="label">{:L($name)}：</label>
           <div class="box" >
                <input name="ranking[]" class="input1 a_0" placeholder="排名" />
                <input name="mem_name[]" class="input2 a_0 auto_0"   placeholder="选手姓名" />
                <input name="win_price[]" class="input3 a_0" placeholder="赢取的金额"/>
                <input name="poy_points[]" class="input4 a_0" placeholder="赛季积分" />
                <input type="button" value="-" class="del a_0 hiden" onclick="del(0);"  style="width:25px;" />
            </div>
  
            <div class="box2">
                <input type="button" value="+" id="add"  style="width:50px;" class="btn  btn-default"/>
            </div>
</section>